1. Field of the Application
The application relates in general to methods and devices for accessing a memory and central processing unit using the same.
2. Description of the Related Art
The memory accessing device is a device used for accessing a memory, and is normally implemented by a processor. The instruction set of the processor normally includes many types of instructions such as a read (or load) instruction or a write (or store) instruction. The processor performs different types of operations in accessing the memory according to these instructions. For example, data is read or loaded from the memory, or are written to or stored in the memory according to the above read instruction and write instruction.
The memory accessed by the processor may have many memory blocks each having many memory units. The size of a memory block is called a ‘memory word’, and the size of a memory unit is denoted in terms of bytes.
However, the memory width of an instruction may differ from one another. For example, the read instruction can be used for reading data with the size of a memory unit, and the write instruction can be used for writing data with the size of four memory units. In other words, when the processor accesses a memory, not every instruction employs the largest memory width, which is referred to as total memory units included in a memory block.
For example, when the processor accesses one of the memory units of a memory block, the processor reads the entire corresponding memory block, and then selects the needed memory unit from the entire memory units of the corresponding memory block. In this example, the processor reads the entire memory block which includes only one requested memory unit and other unnecessary memory units, thereby deteriorating the execution efficiency of the processor in accessing the memory. Thus, how to improve the execution efficiency in accessing the memory is an issue to be resolved in the industry.